﻿using OpenNETCF.Web;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace OpenNETCF.Extensions.Unit.Test
{
    [TestClass()]
    public class RestConnectorTest
    {
        public TestContext TestContext { get; set; }

        [TestMethod()]
        public void GetTest()
        {
            var deviceAddress = "www.google.com";
            var target = new RestConnector(deviceAddress); // TODO: Initialize to an appropriate value
            var directory = "/";
            var actual = target.Get(directory);

            Assert.IsNotNull(actual);
        }

        [TestMethod()]
        public void AddressParseTest()
        {
            var deviceAddress = "www.domain.com:8080";
            var target = new RestConnector(deviceAddress); // TODO: Initialize to an appropriate value

        }

        [TestMethod()]
        public void UriCtorTest()
        {
            var deviceAddress = "http://agent.mtconnect.org";
            var uri = new Uri(deviceAddress);
            var target = new RestConnector(uri.Host);

        }
    }
}
